package com.solarroast.mirrorarray.gui;

import javax.swing.JButton;

import com.solarroast.mirrorarray.SolarRoastConstants;
import com.solarroast.mirrorarray.components.MirrorArray;
import com.solarroast.mirrorarray.components.MirrorArrayItem;
import com.solarroast.mirrorarray.gui.listeners.MAIClickListener;

public class MirrorArrayItemButton extends JButton implements SolarRoastConstants {
	private static final long serialVersionUID = -6690518594121293689L;
	private MirrorArrayItem mAItem;
	private MirrorArray mArray;
	
	public MirrorArrayItemButton(String name, MirrorArrayItem mAItem, MirrorArray mArray) {
		super(name);
		
		this.mAItem = mAItem;
		this.mArray = mArray;
		
		init();
	}

	public void init() {
		addMouseListener(new MAIClickListener(mAItem, mArray));
	}
}
